<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Reto #1</title>
</head>
<body>
    <form>
        <input type="text" id="textoH">

    </form>
    <button onclick="hacker()">transforma el texto aqui</button>
    <script>
        function hacker(){
            var text = document.getElementById("textoH").value;

            console.log(text);

            for (let i = 0; i < text.length; i++) {
                if(text[i]){
                    if(text[i]=="a"){
                        console.log("a");
                        text=text.replace('a','4');
                        console.log(text[i]);

                    }else if(text[i]=="b"){
                        console.log("b");
                        text=text.replace('b','I3');
                        console.log(text[i]);

                    }else if(text[i]=="c"){
                        console.log("c");
                        text=text.replace('c','[');
                        console.log(text[i]);

                    }else if(text[i]=="d"){
                        console.log("d");
                        text=text.replace('d',')');
                        console.log(text[i]);

                    }else if(text[i]=="e"){
                        console.log("e");
                        text=text.replace('e','3');
                        console.log(text[i]);

                    }else if(text[i]=="f"){
                        console.log("f");
                        text=text.replace('f','|=');
                        console.log(text[i]);

                    }else if(text[i]=="g"){
                        console.log("g");
                        text=text.replace('g','&');
                        console.log(text[i]);

                    }else if(text[i]=="h"){
                        console.log("h");
                        text=text.replace('h','#');
                        console.log(text[i]);

                    }else if(text[i]=="i"){
                        console.log("i");
                        text=text.replace('i','1');
                        console.log(text[i]);

                    }else if(text[i]=="j"){
                        console.log("j");
                        text=text.replace('j',',_|');
                        console.log(text[i]);

                    }else if(text[i]=="k"){
                        console.log("k");
                        text=text.replace('k','>|');
                        console.log(text[i]);

                    }else if(text[i]=="l"){
                        console.log("l");
                        text=text.replace('l','1');
                        console.log(text[i]);

                    }else if(text[i]=="m"){
                        console.log("m");
                        text=text.replace('m','[V]');
                        console.log(text[i]);

                    }else if(text[i]=="n"){
                        console.log("n");
                        text=text.replace('n','^/');
                        console.log(text[i]);

                    }else if(text[i]=="ñ"){
                        console.log("ñ");
                        text=text.replace('ñ','eñe');
                        console.log(text[i]);

                    }else if(text[i]=="o"){
                        console.log("o");
                        text=text.replace('o','0');
                        console.log(text[i]);

                    }else if(text[i]=="p"){
                        console.log("p");
                        text=text.replace('p','|*');
                        console.log(text[i]);

                    }else if(text[i]=="q"){
                        console.log("q");
                        text=text.replace('q','(_,)');
                        console.log(text[i]);

                    }else if(text[i]=="r"){
                        console.log("r");
                        text=text.replace('r','I2');
                        console.log(text[i]);

                    }else if(text[i]=="s"){
                        console.log("s");
                        text=text.replace('s','5');
                        console.log(text[i]);

                    }else if(text[i]=="t"){
                        console.log("t");
                        text=text.replace('t','7');
                        console.log(text[i]);

                    }else if(text[i]=="u"){
                        console.log("u");
                        text=text.replace('u','(_)');
                        console.log(text[i]);

                    }else if(text[i]=="v"){
                        console.log("v");
                        text=text.replace('v','\/');
                        console.log(text[i]);

                    }else if(text[i]=="w"){
                        console.log("w");
                        text=text.replace('w','VV');
                        console.log(text[i]);

                    }else if(text[i]=="x"){
                        console.log("x");
                        text=text.replace('x','><');
                        console.log(text[i]);

                    }else if(text[i]=="y"){
                        console.log("y");
                        text=text.replace('y','j');
                        console.log(text[i]);

                    }else if(text[i]=="z"){
                        console.log("z");
                        text=text.replace('z','2');
                        console.log(text[i]);

                    }
                }
            }
            console.log(text);
            document.write(text);
        }


    </script>
</body>
</html>
